Remove obsolete code from FDialog destructor
This commit is contained in:
parent
9766ee4b6f
commit
07bcf76bf4
|
@ -1,3 +1,6 @@
|
|||
2016-07-10 Markus Gans <guru.mail@muenster.de>
|
||||
* Remove obsolete code from FDialog destructor
|
||||
|
||||
2016-07-08 Markus Gans <guru.mail@muenster.de>
|
||||
* Better code readability: control structures (if/else, while, switch)
|
||||
are now separated by a blank line.
|
||||
|
|
|
@ -1304,6 +1304,8 @@ int FApplication::processTimerEvent()
|
|||
//----------------------------------------------------------------------
|
||||
void FApplication::processTerminalUpdate()
|
||||
{
|
||||
#define MAX_SKIP 8
|
||||
|
||||
if ( terminal_update_pending )
|
||||
{
|
||||
if ( ! input_data_pending )
|
||||
|
@ -1312,7 +1314,7 @@ void FApplication::processTerminalUpdate()
|
|||
terminal_update_pending = false;
|
||||
skipped_terminal_update = 0;
|
||||
}
|
||||
else if ( skipped_terminal_update > 8 )
|
||||
else if ( skipped_terminal_update > MAX_SKIP )
|
||||
{
|
||||
force_terminal_update = true;
|
||||
updateTerminal();
|
||||
|
@ -1323,6 +1325,8 @@ void FApplication::processTerminalUpdate()
|
|||
else
|
||||
skipped_terminal_update++;
|
||||
}
|
||||
|
||||
#undef MAX_SKIP
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1343,6 +1347,7 @@ void FApplication::processCloseWidget()
|
|||
|
||||
close_widget->clear();
|
||||
}
|
||||
|
||||
updateTerminal(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@ FDialog::~FDialog() // destructor
|
|||
{
|
||||
FApplication* fapp;
|
||||
|
||||
delete dialog_menu;
|
||||
dgl_menuitem = 0;
|
||||
delete accelerator_list;
|
||||
accelerator_list = 0;
|
||||
activatePrevWindow();
|
||||
|
@ -56,28 +58,6 @@ FDialog::~FDialog() // destructor
|
|||
{
|
||||
const FRect& geometry = getGeometryGlobalShadow();
|
||||
restoreVTerm (geometry);
|
||||
getParentWidget()->redraw();
|
||||
}
|
||||
|
||||
if ( window_list && ! window_list->empty() )
|
||||
{
|
||||
widgetList::const_iterator iter, end;
|
||||
iter = window_list->begin();
|
||||
end = window_list->end();
|
||||
|
||||
while ( iter != end )
|
||||
{
|
||||
putArea ((*iter)->getGlobalPos(), (*iter)->getVWin());
|
||||
|
||||
if ( ! maximized && ((*iter)->getFlags() & fc::shadow) != 0 )
|
||||
static_cast<FDialog*>(*iter)->drawDialogShadow();
|
||||
|
||||
++iter;
|
||||
}
|
||||
|
||||
setFocusWidget(0);
|
||||
updateTerminal();
|
||||
flush_out();
|
||||
}
|
||||
|
||||
if ( vwin != 0 )
|
||||
|
@ -777,10 +757,13 @@ void FDialog::onMouseDoubleClick (FMouseEvent* ev)
|
|||
{
|
||||
dialog_menu->unselectItem();
|
||||
dialog_menu->hide();
|
||||
activateWindow();
|
||||
raiseWindow();
|
||||
getFocusWidget()->setFocus();
|
||||
setClickedWidget(0);
|
||||
|
||||
if ( isModal() )
|
||||
done(FDialog::Reject);
|
||||
done (FDialog::Reject);
|
||||
else
|
||||
close();
|
||||
}
|
||||
|
@ -812,6 +795,7 @@ void FDialog::onWindowActive (FEvent*)
|
|||
//----------------------------------------------------------------------
|
||||
void FDialog::onWindowInactive (FEvent*)
|
||||
{
|
||||
if ( ! dialog_menu->isVisible() )
|
||||
FWindow::previous_widget = this;
|
||||
|
||||
if ( isVisible() && isEnabled() )
|
||||
|
|
|
@ -526,6 +526,7 @@ void FFileDialog::onKeyPress (FKeyEvent* ev)
|
|||
return;
|
||||
|
||||
int key = ev->key();
|
||||
|
||||
switch ( key )
|
||||
{
|
||||
case fc::Fkey_erase:
|
||||
|
|
Loading…
Reference in New Issue