Commit f3467272 authored by Dick Hollenbeck's avatar Dick Hollenbeck

FIX: only invoke fp-lib-table options editor when table not empty.

parent bfc72b01
...@@ -583,28 +583,31 @@ private: ...@@ -583,28 +583,31 @@ private:
{ {
FP_TBL_MODEL* tbl = cur_model(); FP_TBL_MODEL* tbl = cur_model();
int curRow = getCursorRow(); if( tbl->GetNumberRows() )
ROW& row = tbl->rows[curRow]; {
int curRow = getCursorRow();
ROW& row = tbl->rows[curRow];
wxString result; wxString result;
const wxString& options = row.GetOptions(); const wxString& options = row.GetOptions();
InvokePluginOptionsEditor( this, row.GetNickName(), row.GetType(), options, &result ); InvokePluginOptionsEditor( this, row.GetNickName(), row.GetType(), options, &result );
if( options != result ) if( options != result )
{ {
row.SetOptions( result ); row.SetOptions( result );
// all but options: // all but options:
m_cur_grid->AutoSizeColumn( COL_NICKNAME, false ); m_cur_grid->AutoSizeColumn( COL_NICKNAME, false );
m_cur_grid->AutoSizeColumn( COL_URI, false ); m_cur_grid->AutoSizeColumn( COL_URI, false );
m_cur_grid->AutoSizeColumn( COL_TYPE, false ); m_cur_grid->AutoSizeColumn( COL_TYPE, false );
// On Windows, the grid is not refresh, // On Windows, the grid is not refresh,
// so force resfresh after a change // so force resfresh after a change
#ifdef __WINDOWS__ #ifdef __WINDOWS__
Refresh(); Refresh();
#endif #endif
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment