There is error in project configuration in previous commits. This commit is fixed it. Dict caching and one-time drawing of letters now working
This commit is contained in:
@@ -130,26 +130,25 @@ void MainFrame::SetGridImage(GridType &grid, size_t w) {
|
||||
for (size_t i = 0; i < winfos.size(); ++i){
|
||||
if (winfos.at(i).direct == true){
|
||||
for (size_t j = 0; j < winfos.at(i).len; ++j)
|
||||
if ( !usedCells.at(i).at(j) ){
|
||||
if ( !usedCells.at(winfos.at(i).x+j).at(winfos.at(i).y) ) {
|
||||
dc.DrawText(
|
||||
_words.at(i).at(j),
|
||||
sq_w*(winfos.at(i).x+j) + sq_w*0.24,
|
||||
sq_h*winfos.at(i).y
|
||||
);
|
||||
usedCells.at(i).at(j) = true;
|
||||
usedCells.at(winfos.at(i).x+j).at(winfos.at(i).y) = true;
|
||||
}
|
||||
} else {
|
||||
for (size_t j = 0; j < winfos.at(i).len; ++j)
|
||||
if ( !usedCells.at(i).at(j) ){
|
||||
if ( !usedCells.at(winfos.at(i).x).at(winfos.at(i).y+j) ) {
|
||||
dc.DrawText(
|
||||
_words.at(i).at(j),
|
||||
sq_w*winfos.at(i).x + sq_w*0.24,
|
||||
sq_h*(winfos.at(i).y+j)
|
||||
);
|
||||
usedCells.at(i).at(j) = true;
|
||||
usedCells.at(winfos.at(i).x).at(winfos.at(i).y+j) = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,11 +205,11 @@ void MainFrame::OnbtnGenerateClick(wxCommandEvent &event) {
|
||||
SetGridImage(grid);
|
||||
_words.clear();
|
||||
}
|
||||
catch (...){
|
||||
catch ( ... ){
|
||||
tOutput->Clear();
|
||||
this->Refresh();
|
||||
wxMessageBox( wxT("Не могу создать кроссворд"), wxT("Ошибка"), wxICON_ERROR );
|
||||
}
|
||||
this->Refresh();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<Compiler Options="-g;-O0;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" C_Options="-g;-O0;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0"/>
|
||||
<Linker Options="$(shell wx-config --debug=yes --libs --unicode=yes)" Required="yes"/>
|
||||
<ResourceCompiler Options="$(shell wx-config --rcflags)" Required="no"/>
|
||||
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).out" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
|
||||
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).out" IntermediateDirectory="./Debug" Command="./$(ProjectName).out" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
|
||||
<Environment EnvVarSetName="<Use Defaults>" DbgSetName="<Use Defaults>">
|
||||
<![CDATA[]]>
|
||||
</Environment>
|
||||
@@ -85,7 +85,7 @@
|
||||
</Compiler>
|
||||
<Linker Options="-s;$(shell wx-config --debug=no --libs --unicode=yes)" Required="yes"/>
|
||||
<ResourceCompiler Options="$(shell wx-config --rcflags)" Required="no"/>
|
||||
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).out" IntermediateDirectory="../Release" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="yes" IsEnabled="yes"/>
|
||||
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).out" IntermediateDirectory="../Release" Command="./$(ProjectName).out" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="yes" IsEnabled="yes"/>
|
||||
<Environment EnvVarSetName="<Use Defaults>" DbgSetName="<Use Defaults>">
|
||||
<![CDATA[]]>
|
||||
</Environment>
|
||||
|
||||
Reference in New Issue
Block a user