void CMainFrame::OnOptionsDefineColumns() { TextView *view = getActiveTextView(); if(view == NULL) { return; } FileFormat param = getOptions().m_fileFormat; CDefineFileFormatDlg dlg(param,view->getCurrentOrigString()); if(dlg.DoModal() == IDOK) { getOptions().m_fileFormat = param; if(isMenuItemChecked(this, ID_OPTIONS_IGNORECOLUMNS)) { view->setIgnoreColumns(true); } } }
void CMainFrame::OnOptionsIgnoreColumns() { TextView *view = getActiveTextView(); if(view == NULL) { return; } if(!isMenuItemChecked(this, ID_OPTIONS_IGNORECOLUMNS)) { const Options &options = getOptions(); if(options.m_fileFormat.isEmpty()) { OnOptionsDefineColumns(); } if(options.m_fileFormat.isEmpty()) { return; } } view->setIgnoreColumns(toggleMenuItem(this,ID_OPTIONS_IGNORECOLUMNS)); }