| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #1565
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Fl_File_Chooser doesn't tell in callback of beeing closed by ok button |
Version: | 1.1.7 |
Created By: | Ed |
Assigned To: | mike |
Fix Version: | 1.1-current (SVN: v5644) |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
| The Fl_File_Chooser callback is called, when there was a new directory choosen and when the File_Chooser was closed by ok button. Inside the callback function it is not possible to see, whether the callback came from navigation or from ok button. The ok button hides the window, but in the moment hide() is called after callback:
void Fl_File_Chooser::cb_okButton_i(Fl_Return_Button*, void*) { // Do any callback that is registered... if (callback_) (*callback_)(this, data_);
window->hide(); }
This should be changed to:
void Fl_File_Chooser::cb_okButton_i(Fl_Return_Button*, void*) { window->hide(); // Do any callback that is registered... if (callback_) (*callback_)(this, data_); }
This way it is possible to recognize the ok button event by checking if Fl_File_Chooser is visible(). If !visible() the callback was made by ok button. | |
|
#2 | mike 11:42 Jan 28, 2007 |
| Fixed in Subversion repository.
Used your proposed fix... | |
[ Return to Bugs & Features ]
|
| |